---
id: fail-run
title: "Fail a run"
description: "Marks the run as `FAILED`."
sidebar_label: "Fail a run"
hide_title: true
hide_table_of_contents: true
api:
  {
    "operationId": "failRun",
    "description": "Marks the run as `FAILED`.",
    "deprecated": true,
    "tags": ["Jobs"],
    "responses":
      {
        "200":
          {
            "description": "OK",
            "content":
              {
                "application/json":
                  {
                    "schema":
                      {
                        "type": "object",
                        "properties":
                          {
                            "id":
                              {
                                "description": "The ID of the run.",
                                "type": "string",
                                "format": "uuid",
                              },
                            "createdAt":
                              {
                                "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the date/time the run was created.",
                                "type": "string",
                                "format": "date-time",
                              },
                            "updatedAt":
                              {
                                "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the date/time the run was updated.",
                                "type": "string",
                                "format": "date-time",
                              },
                            "nominalStartTime":
                              {
                                "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the nominal start time of the run.",
                                "type": "string",
                                "format": "date-time",
                              },
                            "nominalEndTime":
                              {
                                "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the nominal end time of the run.",
                                "type": "string",
                                "format": "date-time",
                              },
                            "state":
                              {
                                "description": "The current state of the run.",
                                "type": "string",
                                "enum":
                                  [
                                    "NEW",
                                    "RUNNING",
                                    "COMPLETED",
                                    "FAILED",
                                    "ABORTED",
                                  ],
                              },
                            "startedAt":
                              {
                                "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the start time of the run.",
                                "type": "string",
                                "format": "date-time",
                              },
                            "endedAt":
                              {
                                "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the end time of the run.",
                                "type": "string",
                                "format": "date-time",
                              },
                            "durationMs":
                              {
                                "type": "integer",
                                "description": "The total duration of the run. Measured in milliseconds.",
                              },
                            "args":
                              {
                                "description": "The arguments of the run.",
                                "type": "object",
                              },
                            "facets":
                              {
                                "description": "The facets of the run. For a full list of standard run facets, see [OpenLineage](https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.md#standard-facets).",
                                "type": "object",
                                "additionalProperties":
                                  {
                                    "description": "A custom facet enables the extension of _dataset_, _job_, and _run_ metadata. A custom facet **must** also have a schema, where a version of the schema is identifiable via a URL. A field within the schema **must** not start with an underscore (`_`).",
                                    "allOf":
                                      [
                                        {
                                          "description": "All base facet fields are prefixed with an underscore (`_`) to avoid field naming conflicts defined with other facets.",
                                          "type": "object",
                                          "properties":
                                            {
                                              "_producer":
                                                {
                                                  "description": "URI identifying the producer of this metadata. For example this could be a git url with a given tag or sha",
                                                  "type": "string",
                                                  "format": "uri",
                                                  "example": "https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client",
                                                },
                                              "_schemaURL":
                                                {
                                                  "description": "The URL to the corresponding version of the schema definition following a $ref URL Reference (see https://swagger.io/docs/specification/using-ref/)",
                                                  "type": "string",
                                                  "format": "uri",
                                                  "example": "https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/spec/OpenLineage.yml#MyCustomJobFacet",
                                                },
                                            },
                                          "required":
                                            ["_producer", "_schemaURL"],
                                          "title": "BaseFacet",
                                        },
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                        },
                                      ],
                                    "title": "CustomFacet",
                                  },
                                "title": "RunFacets",
                              },
                          },
                        "example":
                          {
                            "id": "870492da-ecfb-4be0-91b9-9a89ddd3db90",
                            "createdAt": "2019-05-09T19:49:24.201361Z",
                            "updatedAt": "2019-05-09T19:49:24.201361Z",
                            "nominalStartTime": null,
                            "nominalEndTime": null,
                            "state": "RUNNING",
                            "startedAt": "2019-05-09T15:17:32.690346",
                            "endedAt": null,
                            "durationMs": null,
                            "args":
                              {
                                "email": "me@example.com",
                                "emailOnFailure": "false",
                                "emailOnRetry": "true",
                                "retries": "1",
                              },
                            "facets": {},
                          },
                        "title": "IncompleteRun",
                      },
                  },
              },
          },
      },
    "parameters":
      [
        {
          "name": "id",
          "in": "path",
          "description": "The ID of the run.",
          "required": true,
          "schema":
            {
              "type": "string",
              "format": "uuid",
              "example": "ea9badc5-7cb2-49af-9a9f-155771d3a797",
            },
        },
        {
          "name": "at",
          "in": "query",
          "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the time when the run transitioned.",
          "required": false,
          "schema": { "type": "string", "format": "date-time" },
        },
      ],
    "method": "post",
    "path": "/jobs/runs/{id}/fail",
    "servers":
      [
        {
          "url": "http://localhost:5000/api/v1",
          "description": "Local API server",
        },
      ],
    "info":
      {
        "title": "Marquez",
        "version": "0.50.0",
        "description": "Marquez is an open source **metadata service** for the **collection**, **aggregation**, and **visualization** of a data ecosystem's metadata.",
        "license":
          {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html",
          },
      },
    "postman":
      {
        "name": "Fail a run",
        "description":
          { "content": "Marks the run as `FAILED`.", "type": "text/plain" },
        "url":
          {
            "path": ["jobs", "runs", ":id", "fail"],
            "host": ["{{baseUrl}}"],
            "query":
              [
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the time when the run transitioned.",
                      "type": "text/plain",
                    },
                  "key": "at",
                  "value": "",
                },
              ],
            "variable":
              [
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "(Required) The ID of the run.",
                      "type": "text/plain",
                    },
                  "type": "any",
                  "value": "",
                  "key": "id",
                },
              ],
          },
        "header": [{ "key": "Accept", "value": "application/json" }],
        "method": "POST",
      },
  }
sidebar_class_name: "post api-method"
info_path: docs/api/marquez
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import TabItem from "@theme/TabItem";

## Fail a run

:::caution deprecated

This endpoint has been deprecated and may be removed in future versions of the API.

:::

Marks the run as `FAILED`.

<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"id","in":"path","description":"The ID of the run.","required":true,"schema":{"type":"string","format":"uuid","example":"ea9badc5-7cb2-49af-9a9f-155771d3a797"}}}></ParamsItem></ul></div></details><details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Query Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"at","in":"query","description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the time when the run transitioned.","required":false,"schema":{"type":"string","format":"date-time"}}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>

OK

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"uuid"} qualifierMessage={undefined} schema={{"description":"The ID of the run.","type":"string","format":"uuid"}}></SchemaItem><SchemaItem collapsible={false} name={"createdAt"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the date/time the run was created.","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"updatedAt"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the date/time the run was updated.","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"nominalStartTime"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the nominal start time of the run.","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"nominalEndTime"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the nominal end time of the run.","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"state"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`NEW`, `RUNNING`, `COMPLETED`, `FAILED`, `ABORTED`]"} schema={{"description":"The current state of the run.","type":"string","enum":["NEW","RUNNING","COMPLETED","FAILED","ABORTED"]}}></SchemaItem><SchemaItem collapsible={false} name={"startedAt"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the start time of the run.","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"endedAt"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the end time of the run.","type":"string","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"durationMs"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","description":"The total duration of the run. Measured in milliseconds."}}></SchemaItem><SchemaItem collapsible={false} name={"args"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"description":"The arguments of the run.","type":"object"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>facets</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

The facets of the run. For a full list of standard run facets, see [OpenLineage](https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.md#standard-facets).

</div><SchemaItem collapsible={false} name={"description"} required={false} schemaName={""} qualifierMessage={undefined} schema={"A custom facet enables the extension of _dataset_, _job_, and _run_ metadata. A custom facet **must** also have a schema, where a version of the schema is identifiable via a URL. A field within the schema **must** not start with an underscore (`_`)."}></SchemaItem><SchemaItem collapsible={false} name={"allOf"} required={false} schemaName={""} qualifierMessage={undefined} schema={[{"description":"All base facet fields are prefixed with an underscore (`_`) to avoid field naming conflicts defined with other facets.","type":"object","properties":{"_producer":{"description":"URI identifying the producer of this metadata. For example this could be a git url with a given tag or sha","type":"string","format":"uri","example":"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client"},"_schemaURL":{"description":"The URL to the corresponding version of the schema definition following a $ref URL Reference (see https://swagger.io/docs/specification/using-ref/)","type":"string","format":"uri","example":"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/spec/OpenLineage.yml#MyCustomJobFacet"}},"required":["_producer","_schemaURL"],"title":"BaseFacet"},{"type":"object","additionalProperties":true}]}></SchemaItem><SchemaItem collapsible={false} name={"title"} required={false} schemaName={""} qualifierMessage={undefined} schema={"CustomFacet"}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"id\": \"870492da-ecfb-4be0-91b9-9a89ddd3db90\",\n  \"createdAt\": \"2019-05-09T19:49:24.201361Z\",\n  \"updatedAt\": \"2019-05-09T19:49:24.201361Z\",\n  \"nominalStartTime\": null,\n  \"nominalEndTime\": null,\n  \"state\": \"RUNNING\",\n  \"startedAt\": \"2019-05-09T15:17:32.690346\",\n  \"endedAt\": null,\n  \"durationMs\": null,\n  \"args\": {\n    \"email\": \"me@example.com\",\n    \"emailOnFailure\": \"false\",\n    \"emailOnRetry\": \"true\",\n    \"retries\": \"1\"\n  },\n  \"facets\": {}\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div>

